package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 用户健康检测数据实体类
 * 
 * @author mark
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_health_daily_data")
@Schema(name = "ElderHealthDailyData", description = "用户健康检测数据表")
public class ElderHealthDailyData {

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "用户ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "体温")
    @TableField("body_temperature")
    private Float bodyTemperature;

    @Schema(description = "浅度睡眠时间(分钟)")
    @TableField("light_sleep_time")
    private Integer lightSleepTime;

    @Schema(description = "深度睡眠时间(分钟)")
    @TableField("deep_sleep_time")
    private Integer deepSleepTime;

    @Schema(description = "今天行走步数")
    @TableField("steps")
    private Integer steps;

    @Schema(description = "心率")
    @TableField("heart_rate")
    private Integer heartRate;

    @Schema(description = "舒张压")
    @TableField("diastolic_pressure")
    private Float diastolicPressure;

    @Schema(description = "收缩压")
    @TableField("systolic_pressure")
    private Float systolicPressure;

    @Schema(description = "血糖")
    @TableField("blood_glucose")
    private Float bloodGlucose;

    @Schema(description = "血氧")
    @TableField("blood_oxygen")
    private Float bloodOxygen;

    @Schema(description = "定位地址")
    @TableField("location_address")
    private String locationAddress;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;
}
